/**
 * @file sucp.h
 * @author zhaitao (zhaitao.as@outlook.com)
 * @brief Simple Uart Command Paser
 * @version 0.1
 * @date 2021-04-26
 * 
 * @copyright zhaitao.as@outlook.com (c) 2021
 * 
 */

#ifndef __SUCP_H__
#define __SUCP_H__

#include "sucp_conf.h"

struct SUCP_CommandReg
{
	const char cmdName[SUCP_MAX_COMMAND_NAME_SIZE];
	int callback(int argc, char *argv[]);
};

struct SUCP_TypeDef
{
	struct SUCP_CommandReg *cmdList;
	int doString(const char* cmdString);
};

extern int SUCP_Initialize(struct SUCP_TypeDef *sucp, struct SCUP_CommandReg *cmdlist);

extern int SUCP_DoString(const char* str);

extern int SUCP_Encode(const char *cmd, ... );


#endif //__SUCP_H__